export function projectIssueOption(data) {
  var max = Math.max(...data.records);
  let option = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        crossStyle: {
          color: '#999',
        },
      },
    },
    toolbox: {
      feature: {
        dataView: { show: true, readOnly: false },
        restore: { show: true },
        saveAsImage: { show: true },
      },
    },
    legend: {
      data: ['项目问题数量'],
      top: 'bottom',
      left: 200,
    },
    xAxis: [
      {
        type: 'category',
        data: data.applicationNames,
        // data: ['1项目', '2项目', '3项目', '4项目', '5项目', '6项目', '7项目', '8项目', '9项目', '10项目','11项目', '12项目', '13项目', '14项目', '15项目', '16项目', '17项目', '18项目', '19项目', '20项目'],
        //data.x
        axisPointer: {
          type: 'shadow',
        },
      },
    ],
    yAxis: [
      {
        type: 'value',
        name: '个',
        min: 0,
        max: max,
        interval: 1000,
        axisLabel: {
          formatter: '{value}',
        },
      },
    ],
    series: [
      {
        name: '项目问题数量',
        type: 'bar',
        itemStyle: { color: '#66CCFF' },
        data: data.records,
        // data: [2680, 4772, 3218, 5803, 1774, 4182, 925, 2771, 3475, 3244, 991, 2006, 840, 3901, 2542, 2114, 5616, 831, 3141, 2889]
        //data.y
      },
    ],
  };
  return option;
}
